<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0px;
            margin: 0px;
            box-sizing: border-box;
        }

        a {
            text-decoration: none;
        }

        li {
            list-style: none;
        }
        body{
            background-color: black;
            color: white;
        }
        img {
            width: 100px;
            height: 100px;
        }
    </style>
</head>

<body>
    <h1>订单页面</h1>
    <h2>订单完成！</h2>
    <ul class="d_d_biao">
    </ul>

    <h1>总价: <span class="zongjia"></span></h1>
    <script src="https://code.jquery.com/jquery-3.7.1.js"></script>
    <script>
        var a = JSON.parse(localStorage.getItem('car'))
        var b = JSON.parse(localStorage.getItem('zongjia'))
        a.forEach(item => {
            $('.d_d_biao').append(`
            <li>
                <img src="${item.img}" alt="">&emsp;&emsp;
                <span>${item.name}</span>&emsp;&emsp;
                <span>${item.price}</span>元&emsp;&emsp;&emsp;
                数量<span>${item.num}</span>
            </li>
            `)
        });
        $('.zongjia').html(b+'元')
    </script>
</body>

</html>